<template>
  <DIV class="bg_write" v-loading="loading">
    <el-col :span="24" class="content_title clearfix" v-if="!im">
      <el-col :span="12">
        <HeadTitle></HeadTitle>
      </el-col>
      <el-col :span="12"> </el-col>
    </el-col>
    <div class="blank"></div>
    <div class="user_info">
      <h3 style="margin-bottom: 10px">基本信息</h3>

      <div class="info">
        <ul style="display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: flex-start">
          <li>
            <span>用户ID：</span>
            {{ base.id }}
          </li>
          <li>
            <span>用户昵称：</span>
            {{ base.nickname || "----" }}
          </li>
          <li>
            <span>会员账号：</span>
            {{ base.username }}
          </li>

          <li>
            <span>注册时间：</span>
            {{ base.created_time | getTimeFormat }}
            {{ base.reg_ip == null ? "" : "(" + base.reg_ip + ")" }}
          </li>
          <li>
            <span>注册IP：</span>
            {{ base.reg_ip || "----" }}
          </li>
          <li>
            <span>注册地址：</span>
            {{ base.reg_ip_address || "----" }}
          </li>
          <li>
            <span>会员等级：</span>
            {{ base.rating_cn }}
          </li>
          <li v-if="is_open.xnbkj && is_open.xnbkj.is_open == 1">
            <span>虚拟币等级：</span>
            {{ base.coin_rating_cn }}
          </li>
          <li>
            <span>所在区域：</span>
            {{ base.province || "----" }}{{ base.city }}{{ base.area }}{{ base.town }}
          </li>
          <li>
            <span>推荐人账号：</span>
            <span id="user_account">{{ base.tid_cn || "----" }}</span>
            <i class="el-icon-document-copy" style="font-size: 18px; padding-left: 10px" @click="copy_tjm('user_account')"></i>
          </li>
          <li>
            <span>手机号码：</span>
            <span id="user_tel">{{ base.tel || "----" }}</span>
            <i class="el-icon-document-copy" style="font-size: 18px; padding-left: 10px" @click="copy_tjm('user_tel')"></i>
          </li>
          <li>
            <span>推荐人昵称：</span>
            {{ base.tid_nickname || "----" }}
          </li>
          <li>
            <span>登录时间：</span>
            <span>
              {{ base.update_time | getTimeFormat }}
              {{ base.last_ip == null ? "" : "(" + base.last_ip + ")" }}
            </span>
          </li>
          <li>
            <span>登录IP：</span>
            <span id="login_ip">{{ base.last_ip || "----" }}</span>
            <i class="el-icon-document-copy" style="font-size: 18px; padding-left: 10px" @click="copy_tjm('login_ip')"></i>
          </li>
          <li>
            <span>登录地址：</span>
            {{ base.last_ip_address || "----" }}
          </li>
          <li>
            <span>openid：</span>
            {{ base.openid || "----" }}
          </li>
          <li>
            <span>微信unionid：</span>
            {{ base.unionid || "----" }}
          </li>
          <li>
            <span>微信小程序openid：</span>
            {{ base.applets_openid || "----" }}
          </li>
          <li>
            <span>微信app_openid：</span>
            {{ base.app_openid || "----" }}
          </li>
          <li>
            <span>支付宝app_openid：</span>
            {{ base.zfb_openid || "----" }}
          </li>
          <li>
            <span>支付宝用户ID：</span>
            {{ base.zfb_user_id || "----" }}
          </li>

          <li>
            <span>抖音小程序openid：</span>
            {{ base.tt_openid || "----" }}
          </li>
          <li>
            <span>抖音小程序unionid：</span>
            {{ base.tt_unionid || "----" }}
          </li>
          <li>
            <span>注册来源：</span>
            {{ base.source || "----" }}
          </li>
          <li>
            <span>设备码UUID：</span>
            {{ base.device || "----" }}
          </li>
          <li>
            <span>升级{{ base.rating_cn }}等级时间：</span>
            {{ base.upgrade_time | getTimeFormat }}
          </li>
          <li>
            <span>升级会员时间：</span>
            {{ base.vip_upgrade_time | getTimeFormat }}
          </li>

          <li v-if="is_open.xnbkj && is_open.xnbkj.is_open == 1">
            <span>升级{{ base.coin_rating_cn }}等级时间：(开启矿机插件)</span>
            {{ base.coin_upgrade_time | getTimeFormat }}
          </li>
          <li v-if="list.driving_id">
            <span>代驾订单数：</span>
            {{ base.driving_number || "----" }}
          </li>
          <li v-if="list.driving_id">
            <span>代驾金额：</span>
            {{ base.driving_money | toFixedNum }}
          </li>
        </ul>
      </div>
    </div>

    <div class="blank"></div>

    <div class="box">
      <div class="sups_tub clearfix mgt15" style="position: initial">
        <div class="tabs j-tab clearfix mgt10 mgb20 tl user_tables">
          <a @click="getInfo('1')" class="tabs_a f_l" :class="{ template_active: acIndex == '1' }">消费能力</a>
          <a @click="getInfo('2')" class="tabs_a f_l" :class="{ template_active: acIndex == '2' }">市场能力</a>
          <a @click="getInfo('3')" class="tabs_a f_l" :class="{ template_active: acIndex == '3' }">签到记录</a>
          <a @click="getInfo('4')" class="tabs_a f_l" :class="{ template_active: acIndex == '4' }">优惠券</a>
          <!-- <a @click="getInfo('5')"
                        class=" tabs_a f_l "
                        :class="{template_active:acIndex=='5'}">
                        积分变动记录
          </a>-->
          <a @click="getInfo('6')" class="tabs_a f_l" :class="{ template_active: acIndex == '6' }" v-if="is_open.xnbkj && is_open.xnbkj.is_open != 0">虚拟币明细</a>
          <a @click="goOther(list.driving_id)" class="tabs_a f_l" v-if="is_open.djpt && is_open.djpt.is_open == 1 && list.driving_id">司机数据</a>
          <a @click="goOther1(list.driving_id)" class="tabs_a f_l" v-if="is_open.djpt && is_open.djpt.is_open == 1">用户代驾订单</a>
          <a @click="openmore" class="tabs_a f_l">更多</a>
        </div>
        <el-row>
          <div v-show="acIndex == '1'">
            <el-row class="tl user_info_xiaofei">
              <el-col :span="6">
                <div>总出订单（笔）</div>
                <div v-if="list.xf">{{ list.xf.zcdd }}</div>
              </el-col>
              <el-col :span="6">
                <div>总消费金额（元）</div>
                <div v-if="list.xf">￥{{ list.xf.zxfjr | keepTwoNum }}</div>
              </el-col>
              <el-col :span="6">
                <div>本月订单（笔）</div>
                <div v-if="list.xf">{{ list.xf.dydd || 0 }}</div>
              </el-col>
              <el-col :span="6">
                <div>本月消费金额（元）</div>
                <div v-if="list.xf">{{ list.xf.byxf | keepTwoNum }}</div>
              </el-col>
              <el-col :span="6">
                <div>累加充值</div>
                <div>{{ base.sum_money | keepTwoNum }}</div>
              </el-col>
              <el-col :span="6">
                <div>累计佣金</div>
                <div>{{ base.sum_amount | keepTwoNum }}</div>
              </el-col>
              <el-col :span="6">
                <div>累计积分</div>
                <div>{{ base.sum_integral | keepTwoNum }}</div>
              </el-col>
              <el-col :span="6">
                <div>会员商城总出订单</div>
                <div>{{ base.zcdd_vip || 0 }}</div>
              </el-col>

              <el-col :span="6">
                <div>会员商城消费</div>
                <div>{{ base.buy_vip | keepTwoNum }}</div>
              </el-col>
              <el-col :span="6">
                <div>一次性最高消费会员商品</div>
                <div>{{ base.highest | keepTwoNum }}</div>
              </el-col>
            </el-row>
            <el-row>
              <el-table ref="multipleTable" :data="list.order" stripe header-row-class-name="head_color" tooltip-effect="dark" style="width: 99.9%">
                <el-table-column label="头像" min-width="80">
                  <template slot-scope="scope">
                    <div class="img_bor_tx" v-if="scope">
                      <img :src="$fnc.getImgUrl(base.avatar)" alt />
                    </div>
                  </template>
                </el-table-column>

                <el-table-column label="用户信息" min-width="180">
                  <template slot-scope="scope">
                    <div class="tab_div" v-if="scope">
                      <div>
                        <span>用户昵称：</span>
                        <span>{{ base.nickname || "----" }}</span>
                      </div>
                      <div>
                        <span>会员账号：</span>
                        <span>{{ base.username }}</span>
                      </div>
                      <div>
                        <span>用户等级：</span>
                        <span class="rat" v-show="base.rating_cn">{{ base.rating_cn }}</span>
                      </div>
                    </div>
                  </template>
                </el-table-column>

                <el-table-column label="订单编号" min-width="200">
                  <template slot-scope="scope">
                    <router-link :to="'/index/order?oid=' + scope.row.oid">
                      <span style="color: #1c89d5">{{ scope.row.oid }}</span>
                    </router-link>
                  </template>
                </el-table-column>

                <el-table-column label="收货人" min-width="257">
                  <template slot-scope="scope">{{ scope.row.mail_name }}</template>
                </el-table-column>

                <el-table-column label="商品总价" min-width="100">
                  <template slot-scope="scope">{{ scope.row.money | keepTwoNum }}</template>
                </el-table-column>

                <el-table-column label="下单时间" min-width="100">
                  <template slot-scope="scope">{{ scope.row.created_time | getTimeFormat }}</template>
                </el-table-column>

                <el-table-column label="订单完成状态" min-width="100">
                  <template slot-scope="scope">{{ scope.row.status }}</template>
                </el-table-column>
              </el-table>
            </el-row>
          </div>
          <div v-show="acIndex == '2'">
            <el-row class="tl user_info_xiaofei" v-if="list.sc">
              <el-col :span="6">
                <div>直推人数（人）</div>
                <div>{{ list.sc.ynumber || "0" }}</div>
              </el-col>

              <el-col :span="6">
                <div>总人数（人）</div>
                <div>{{ list.sc.znumber }}</div>
              </el-col>
              <el-col :span="6">
                <div>直推分销（人）</div>
                <div>{{ list.sc.yvip }}</div>
              </el-col>

              <el-col :span="6">
                <div>总分销（人）</div>
                <div>{{ list.sc.zvip }}</div>
              </el-col>

              <el-col :span="6">
                <div>一级业绩</div>
                <div>{{ list.sc.ysales | keepTwoNum }}</div>
              </el-col>

              <el-col :span="6">
                <div>总业绩</div>
                <div>{{ list.sc.zsales | keepTwoNum }}</div>
              </el-col>

              <el-col :span="6">
                <div>一级会员商城业绩</div>
                <div>{{ list.sc.ysales_vip | keepTwoNum }}</div>
              </el-col>

              <el-col :span="6">
                <div>总会员商城业绩</div>
                <div>{{ list.sc.zsales_vip | keepTwoNum }}</div>
              </el-col>
            </el-row>
            <el-table ref="multipleTable" :data="list.money" stripe tooltip-effect="dark" header-row-class-name="head_color" style="width: 99.9%">
              <el-table-column label="订单" min-width="250">
                <template slot-scope="scope">
                  <div class="tab_div">
                    <div>
                      <span>订单号：</span>
                      <span>{{ scope.row.oid }}</span>
                    </div>
                    <div>
                      <span>时间：</span>
                      <span>{{ scope.row.created_time | getTimeFormat }}</span>
                    </div>
                    <div>
                      <span>备注：</span>
                      <span>{{ scope.row.remark }}</span>
                    </div>
                  </div>
                </template>
              </el-table-column>

              <el-table-column label="资金" min-width="180">
                <template slot-scope="scope">
                  <div class="tab_div">
                    <div>
                      <span>资金增减：</span>
                      <span>
                        {{ scope.row.money | keepTwoNum }}
                        {{ scope.row.style_cn }}
                      </span>
                    </div>
                    <div>
                      <span>剩余资金：</span>
                      <span>
                        {{ scope.row.balance | keepTwoNum }}
                        {{ scope.row.style_cn }}
                      </span>
                    </div>
                  </div>
                </template>
              </el-table-column>

              <el-table-column label="来源" min-width="180">
                <template slot-scope="scope">
                  <div class="tab_div">
                    <div>
                      <span>来源昵称：</span>
                      <span>{{ scope.row.ly_nickname || "----" }}</span>
                    </div>
                    <div>
                      <span>来源账号：</span>
                      <span @click="func_1(scope.row.uid)" style="cursor: pointer">{{ scope.row.ly_name }}</span>
                    </div>
                    <div>
                      <span>来源等级：</span>
                      <span class="rat" v-show="scope.row.ly_rating_cn">{{ scope.row.ly_rating_cn }}</span>
                    </div>
                  </div>
                </template>
              </el-table-column>
              <el-table-column label="资金类型" align="center" min-width="100">
                <template slot-scope="scope">
                  <div class="tab_div">
                    <div>
                      <span>{{ moneyType(scope.row.cate) }}</span>
                      <span></span>
                    </div>
                    <div>
                      <span></span>
                      <span class="rat" :class="[scope.row.style == '积分抵用' ? 'lei_red' : scope.row.style == '加佣金' ? 'tx' : 'sh']">{{ scope.row.style }}</span>
                    </div>
                  </div>
                </template>
              </el-table-column>
            </el-table>
          </div>
          <div v-show="acIndex == '3'">
            <el-table ref="multipleTable" :data="list.sign_in" stripe tooltip-effect="dark" header-row-class-name="head_color" style="width: 99.9%">
              <el-table-column label="动作" min-width="150">
                <template slot-scope="scope">{{ scope.row.type }}</template>
              </el-table-column>

              <el-table-column label="获得积分" min-width="100">
                <template slot-scope="scope">{{ scope.row.score }}</template>
              </el-table-column>

              <el-table-column label="额外获得积分" min-width="100">
                <template slot-scope="scope">{{ scope.row.score_plus }}</template>
              </el-table-column>

              <el-table-column label="签到时间" min-width="100">
                <template slot-scope="scope">{{ scope.row.created_time | getTimeFormat }}</template>
              </el-table-column>
            </el-table>
          </div>
          <div v-show="acIndex == '4'">
            <el-table ref="multipleTable" :data="list.coupon" stripe header-row-class-name="head_color" tooltip-effect="dark" style="width: 99.9%">
              <el-table-column label="优惠券名称" min-width="100">
                <template slot-scope="scope">{{ scope.row.coupon_num }}</template>
              </el-table-column>
              <el-table-column label="面值" min-width="100">
                <template slot-scope="scope">{{ scope.row.desc }}</template>
              </el-table-column>
              <el-table-column label="是否使用" min-width="100">
                <template slot-scope="scope">{{ scope.row.is_use == 0 ? "未使用" : "已使用" }}</template>
              </el-table-column>
              <el-table-column label="有效期" min-width="100">
                <template slot-scope="scope">{{ scope.row.begin_time | getTimeFormat }}</template>
              </el-table-column>
              <el-table-column label="兑换时间" min-width="100">
                <template slot-scope="scope">{{ scope.row.end_time | getTimeFormat }}</template>
              </el-table-column>
              <el-table-column label="操作" min-width="100">
                <template slot-scope="scope">{{ scope.row.sum_amount }}</template>
              </el-table-column>
            </el-table>
          </div>
          <div v-show="acIndex == '5'">
            <el-table ref="multipleTable" :data="next_user_ar" stripe header-row-class-name="head_color" tooltip-effect="dark" style="width: 99.9%">
              <el-table-column label="变动前" min-width="100">
                <template slot-scope="scope">{{ scope.row.username }}</template>
              </el-table-column>
              <el-table-column label="变动金额" min-width="100">
                <template slot-scope="scope">{{ scope.row.nickname }}</template>
              </el-table-column>
              <el-table-column label="变动后" min-width="100">
                <template slot-scope="scope">{{ scope.row.rating_cn }}</template>
              </el-table-column>
              <el-table-column label="类型" min-width="100">
                <template slot-scope="scope">{{ scope.row.money }}</template>
              </el-table-column>
              <el-table-column label="创建时间" min-width="100">
                <template slot-scope="scope">{{ scope.row.buy }}</template>
              </el-table-column>
              <el-table-column label="备注" min-width="100">
                <template slot-scope="scope">{{ scope.row.sum_amount }}</template>
              </el-table-column>
            </el-table>
          </div>
          <div v-show="acIndex == '6'">
            <el-row class="tl user_info_xiaofei" v-if="list.attach">
              <el-col :span="6" v-if="list.sc">
                <div>直推人数（人）</div>
                <div>{{ list.sc.ynumber || "0" }}</div>
              </el-col>

              <el-col :span="6" v-if="list.sc">
                <div>总人数（人）</div>
                <div>{{ list.sc.znumber }}</div>
              </el-col>
              <el-col :span="6">
                <div>矿机直推会员（人数）</div>
                <div>{{ list.attach.coin_yvip || "0" }}</div>
              </el-col>
              <el-col :span="6">
                <div>团队会员（人数）</div>
                <div>{{ list.attach.coin_zvip || "0" }}</div>
              </el-col>
              <el-col :span="6">
                <div>持有矿机（数量）</div>
                <div>{{ $fnc.toFixedZ(list.attach.coin_number, 8) }}</div>
              </el-col>
              <el-col :span="6">
                <div>累计兑换（币）</div>
                <div>{{ $fnc.toFixedZ(list.attach.coin_buy, 8) }}</div>
              </el-col>
              <el-col :span="6">
                <div>累计空投（币）</div>
                <div>{{ $fnc.toFixedZ(list.attach.yvip, 8) }}</div>
              </el-col>
              <el-col :span="6">
                <div>直推业绩（币）</div>
                <div>{{ $fnc.toFixedZ(list.attach.coin_ysales, 8) }}</div>
              </el-col>
<!--              <el-col :span="6">-->
<!--                <div>团队业绩（币）</div>-->
<!--                <div>{{ $fnc.toFixedZ(list.attach.coin_sales, 8) }}</div>-->
<!--              </el-col>-->
              <el-col :span="6">
                <div>AICQ存储（币）</div>
                <div>{{ $fnc.toFixedZ(list.attach.zvip, 8) }}</div>
              </el-col>

              <el-col :span="6">
                <div>AICQ活动（币）</div>
                <div>{{ $fnc.toFixedZ(list.attach.ysales, 8) }}</div>
              </el-col>
              <el-col :span="6">
                <div>ETH（币）</div>
                <div>{{ $fnc.toFixedZ(list.attach.esales, 8) }}</div>
              </el-col>
              <el-col :span="6">
                <div>BTC（币）</div>
                <div>{{ $fnc.toFixedZ(list.attach.ssales, 8) }}</div>
              </el-col>
              <el-col :span="6">
                <div>USDT（币）</div>
                <div>{{ $fnc.toFixedZ(list.attach.zsales, 8) }}</div>
              </el-col>
            </el-row>

            <el-table ref="multipleTable" :data="list.coin_money" stripe tooltip-effect="dark" header-row-class-name="head_color" style="width: 99.9%">
              <el-table-column label="头像" min-width="80">
                <template slot-scope="scope">
                  <div class="img_bor_tx" v-if="scope">
                    <img :src="$fnc.getImgUrl(base.avatar)" alt />
                  </div>
                </template>
              </el-table-column>

              <el-table-column label="用户信息" min-width="180">
                <template slot-scope="scope">
                  <div class="tab_div" v-if="scope">
                    <div>
                      <span>用户昵称：</span>
                      <span>{{ base.nickname || "----" }}</span>
                    </div>
                    <div>
                      <span>会员账号：</span>
                      <span>{{ base.username }}</span>
                    </div>
                    <div>
                      <span>用户等级：</span>
                      <span class="rat" v-show="scope.row.rating_cn">{{ scope.row.rating_cn }}</span>
                    </div>
                  </div>
                </template>
              </el-table-column>
              <el-table-column label="订单" min-width="250">
                <template slot-scope="scope">
                  <div class="tab_div">
                    <div>
                      <span>订单号：</span>
                      <span>{{ scope.row.oid }}</span>
                    </div>
                    <div>
                      <span>时间：</span>
                      <span>{{ scope.row.created_time | getTimeFormat }}</span>
                    </div>
                    <div>
                      <span>备注：</span>
                      <span>{{ scope.row.remark }}</span>
                    </div>
                  </div>
                </template>
              </el-table-column>

              <el-table-column label="资金" min-width="180">
                <template slot-scope="scope">
                  <div class="tab_div">
                    <div>
                      <span>资金增减：</span>
                      <span>
                        {{ scope.row.money }}
                        {{ scope.row.style_cn }}
                      </span>
                    </div>
                    <div>
                      <span>剩余资金：</span>
                      <span>
                        {{ scope.row.balance | keepTwoNum }}
                        {{ scope.row.style_cn }}
                      </span>
                    </div>
                  </div>
                </template>
              </el-table-column>

              <el-table-column label="来源" min-width="180">
                <template slot-scope="scope">
                  <div class="tab_div">
                    <div>
                      <span>来源昵称：</span>
                      <span>{{ scope.row.ly_name }}</span>
                    </div>
                    <div>
                      <span>来源Id：</span>
                      <span @click="func_1(scope.row.uid)" style="cursor: pointer">{{ scope.row.ly_id }}</span>
                    </div>
                    <div>
                      <span>来源等级：</span>
                      <span class="rat" v-show="scope.row.ly_rating_cn">{{ scope.row.ly_rating_cn }}</span>
                    </div>
                  </div>
                </template>
              </el-table-column>

              <el-table-column label="操作类型" align="center" min-width="100">
                <template slot-scope="scope">
                  <div class="tab_div">
                    <div>
                      <span>资金类型</span>
                      <span></span>
                    </div>
                    <div>
                      <span></span>
                      <span class="rat">{{ scope.row.style }}</span>
                    </div>
                  </div>
                </template>
              </el-table-column>
            </el-table>
          </div>
        </el-row>
      </div>
    </div>
  </DIV>
</template>
<script>
import HeadTitle from "@/components/currency/HeadTitle.vue";

export default {
  props: {
    uid: {
      // type:String,
      default: "0",
    },
    im: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {
      reward_option: [],
      is_open: {},
      show: false,
      loading: false,
      base: {
        id: "",
        username: "",
        rating: "",
        province: "",
        city: "",
        area: "",
        town: "",
        openid: "",
        tid: "",
        tid_cn: "",
      },
      attach: {
        ysales: "",
        esales: "",
        ssales: "",
        zsales: "",
        ynumber: "",
        enumber: "",
        snumber: "",
        znumber: "",
        sum_money: "",
        sum_integral: "",
        sum_amount: "",
      },
      order_ar: [],
      money_ar: [],
      next_user_ar: [],
      acIndex: "1",
      list: [],
    };
  },
  components: {
    HeadTitle,
  },
  methods: {
    openmore() {
      let routeData = this.$router.resolve({
        path: "/index/user/money",
        query: { username: this.base.username },
      });
      window.open(routeData.href, "_blank");
    },
    goOther(id) {
      let routeData = this.$router.resolve({
        path: "/index/driver/driver_employee_detail",
        query: { id: id },
      });
      window.open(routeData.href, "_blank");
    },
    goOther1(id) {
      let routeData = this.$router.resolve({
        path: "/index/driver/driver_orderlist",
        query: { tel: this.base.tel },
      });
      window.open(routeData.href, "_blank");
    },
    moneyType(cate) {
      var str = "";
      var reward = this.$store.state.rewardOption;
      for (var i in reward) {
        if (cate == reward[i].value) {
          str = reward[i].label;
          break;
        }
      }
      return str;
    },
    get_catecn(val) {
      this.$nextTick(() => {
        this.reward_option.forEach((item) => {
          if (item.value == val) {
            return item.label;
          }
        });
      });
    },
    copy_tjm(id) {
      var dom = document.getElementById(id);
      var span = dom.innerText;
      var oInput = document.createElement("input");
      oInput.value = span;
      document.body.appendChild(oInput);
      oInput.select();
      document.execCommand("Copy");
      oInput.className = "oInput";
      oInput.style.display = "none";
      this.$fnc.alertSuccess("复制成功");
    },
    getInfo(index) {
      this.acIndex = index;
    },
    getDetails(id) {
      this.loading = true;
      var data = {};
      data["id"] = id;
      console.log(id, "dddddddddddddd");
      var query = this.$route.query || {};
      var obj = Object.assign(query, data);

      this.$api.getUser.getInfo(obj).then((res) => {
        // console.log(id);
        this.base = res.data.result.base;
        this.attach = res.data.result.attach;
        this.order_ar = res.data.result.order;
        this.money_ar = res.data.result.money;
        this.next_user_ar = res.data.result.next_user;
        this.list = res.data.result;
        this.loading = false;
      });
    },
    handleClick(tab, event) {
      console.log(tab, event);
    },
    imgError(item) {
      if (!item) {
        return require("../../assets/img/default_head.png");
      }
      return item;
    },
  },
  beforeCreate() {
    this.loading = true; //数据未加载之前调用loading
  },
  created() {
    this.is_open = JSON.parse(localStorage.getItem("limit"));

    if (this.$store.state.rewardOption) {
      this.reward_option = this.$store.state.rewardOption;
    } else {
      this.$api.getPlugin.rewardOp({}).then((res) => {
        if (res.data.code == 200) {
          this.rewardOption = res.data.result;
          this.$store.commit("setRewardOption", res.data.result);
        }
      });
    }
    this.loading = false;
  },
  computed: {},
  watch: {},
  filters: {},
  mounted() {
    if (!this.im) {
      this.getDetails(this.$route.query.id);
    }
    this.$bus.$on("toUserInfo", (user) => {
      this.getDetails(user.uid);
    });
  },
};
</script>

<style lang="less" scoped>
.info {
  margin-left: 20px;
}

.info li {
  // display: inline-block;
  float: left;
  width: 30%;
  margin: 10px 5px 5px 0;
}
.info li span {
  font-size: 14px;
}
.box {
  margin-left: 20px;
  margin-right: 20px;
  margin-top: 50px;
  border-bottom: 0 !important;
}
</style>
